<?php
require_once("main.class.php");

if(class_exists('main')){
	$main = new main();	
	$task = $_POST['task'];
	
	if($task == ""){
		die("success: false");
	}
	
	if($task == 'login'){
		print $main->sessao->login($_POST['username'], $_POST['password']);
	}else if($task == 'forgotPassword'){
		print $main->sessao->forgot_password($_POST['email']);
	}else{
		print "{success: false}";
	}
}
?>
